﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.talent.entity;

import javax.validation.constraints.NotNull;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.hh.bss.base.BaseEntity;
import com.hh.bss.util.DateConvertUtils;



public class CvSalary extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "CvSalary";
	public static final String ALIAS_CV_ID = "cvId";
	public static final String ALIAS_CURRENCY = "currency";
	public static final String ALIAS_CURRENT_SALARY = "currentSalary";
	public static final String ALIAS_EXPECT_SALARY = "expectSalary";
	public static final String ALIAS_BONUS_LIST = "bonusList";
	public static final String ALIAS_BONUS_LIST_EN = "bonusListEn";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	public static final String ALIAS_IS_ENG = "isEng";
	
	//date formats
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	public static final String FORMAT_MODIFIED_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer cvId;
	@NotBlank @Length(max=20)
	private java.lang.String currency;
	@NotNull 
	private java.lang.Integer currentSalary;
	@NotNull 
	private java.lang.Integer expectSalary;
	@Length(max=65535)
	private java.lang.String bonusList;
	@Length(max=65535)
	private java.lang.String bonusListEn;
	@Length(max=50)
	private java.lang.String creator;
	
	private java.util.Date createDt;
	@Length(max=50)
	private java.lang.String modifier;
	
	private java.util.Date modifiedDt;
	//columns END
	private java.lang.String isEng;
	
	private String expectSalaryStr;
	private String currentSalaryStr;
	private String expectSalaryEnStr;
	private String currentSalaryEnStr;
	public String getExpectSalaryEnStr() {
		return expectSalaryEnStr;
	}

	public void setExpectSalaryEnStr(String expectSalaryEnStr) {
		this.expectSalaryEnStr = expectSalaryEnStr;
	}

	public String getCurrentSalaryEnStr() {
		return currentSalaryEnStr;
	}

	public void setCurrentSalaryEnStr(String currentSalaryEnStr) {
		this.currentSalaryEnStr = currentSalaryEnStr;
	}

	private String basicSalary;
	private String allowance;
	private String bonus;
	private String reimbursement;
	private String welfare;
	

	public String getBasicSalary() {
		return basicSalary;
	}

	public void setBasicSalary(String basicSalary) {
		this.basicSalary = basicSalary;
	}

	public String getAllowance() {
		return allowance;
	}

	public void setAllowance(String allowance) {
		this.allowance = allowance;
	}

	public String getBonus() {
		return bonus;
	}

	public void setBonus(String bonus) {
		this.bonus = bonus;
	}

	public String getReimbursement() {
		return reimbursement;
	}

	public void setReimbursement(String reimbursement) {
		this.reimbursement = reimbursement;
	}

	public String getWelfare() {
		return welfare;
	}

	public void setWelfare(String welfare) {
		this.welfare = welfare;
	}

	public String getCurrentSalaryStr() {
		return currentSalaryStr;
	}

	public void setCurrentSalaryStr(String currentSalaryStr) {
		this.currentSalaryStr = currentSalaryStr;
	}

	public CvSalary(){
	}

	public CvSalary(
		java.lang.Integer cvId
	){
		this.cvId = cvId;
	}

	public void setCvId(java.lang.Integer value) {
		this.cvId = value;
	}
	
	public java.lang.Integer getCvId() {
		return this.cvId;
	}
	public void setCurrency(java.lang.String value) {
		this.currency = value;
	}
	
	public java.lang.String getCurrency() {
		return this.currency;
	}
	public void setCurrentSalary(java.lang.Integer value) {
		this.currentSalary = value;
	}
	
	public java.lang.Integer getCurrentSalary() {
		return this.currentSalary;
	}
	public void setExpectSalary(java.lang.Integer value) {
		this.expectSalary = value;
	}
	
	public java.lang.Integer getExpectSalary() {
		return this.expectSalary;
	}
	public void setBonusList(java.lang.String value) {
		this.bonusList = value;
	}
	
	public java.lang.String getBonusList() {
		return this.bonusList;
	}
	public void setBonusListEn(java.lang.String value) {
		this.bonusListEn = value;
	}
	
	public java.lang.String getBonusListEn() {
		return this.bonusListEn;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setModifier(java.lang.String value) {
		this.modifier = value;
	}
	
	public java.lang.String getModifier() {
		return this.modifier;
	}
	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_MODIFIED_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_MODIFIED_DT,java.util.Date.class));
	}
	
	public void setModifiedDt(java.util.Date value) {
		this.modifiedDt = value;
	}
	
	public java.util.Date getModifiedDt() {
		return this.modifiedDt;
	}
	
	

	public java.lang.String getIsEng() {
		return isEng;
	}

	public void setIsEng(java.lang.String isEng) {
		this.isEng = isEng;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("CvId",getCvId())
			.append("Currency",getCurrency())
			.append("CurrentSalary",getCurrentSalary())
			.append("ExpectSalary",getExpectSalary())
			.append("BonusList",getBonusList())
			.append("BonusListEn",getBonusListEn())
			.append("Creator",getCreator())
			.append("CreateDt",getCreateDt())
			.append("Modifier",getModifier())
			.append("ModifiedDt",getModifiedDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getCvId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof CvSalary == false) return false;
		if(this == obj) return true;
		CvSalary other = (CvSalary)obj;
		return new EqualsBuilder()
			.append(getCvId(),other.getCvId())
			.isEquals();
	}

	public String getExpectSalaryStr() {
		return expectSalaryStr;
	}

	public void setExpectSalaryStr(String expectSalaryStr) {
		this.expectSalaryStr = expectSalaryStr;
	}
	
	
}

